//
//  LTClassTableViewCell.m
//  LearnTeacher
//
//  Created by zyl on 2024/4/11.
//

#import "LTClassTableViewCell.h"

@implementation LTClassTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code

    self.bgView.layer.cornerRadius = 12;
    self.bgView.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:50/255.0 blue:83/255.0 alpha:0.0500].CGColor;
    self.bgView.layer.shadowOffset = CGSizeMake(0,2);
    self.bgView.layer.shadowOpacity = 1;
    self.bgView.layer.shadowRadius = 12;
    
}

- (void)setData:(NSDictionary *)data
{
    _data = data;
    LTClassModel *model = [LTClassModel modelWithDictionary:data];
    self.title.text = model.grade_name;
    self.num.text = [NSString stringWithFormat:@"学生：%@人",model.studeentNum];
    self.vipNum.text = [NSString stringWithFormat:@"VIP：%@人",model.vipstudent];
}

- (IBAction)computerExam:(UIButton *)sender {
    UIViewController *vc = [[UIViewController alloc] initWithClassName:@"LTMachineReportViewController"];
    LTClassModel *model = [LTClassModel modelWithDictionary:self.data];
    vc.paraObject = model;
    vc.hidesBottomBarWhenPushed = YES;
    [[UIViewController currentViewController].navigationController pushViewController:vc animated:YES];
}

- (IBAction)goClass:(UIButton *)sender {
    
    UIViewController *vc = [[UIViewController alloc] initWithClassName:@"LTHomeworkReportViewController"];
    LTClassModel *model = [LTClassModel modelWithDictionary:self.data];
    vc.paraObject = model;
    vc.hidesBottomBarWhenPushed = YES;
    [[UIViewController currentViewController].navigationController pushViewController:vc animated:YES];
    
}
@end
